<template>  
<div>
     <!--头部  -->
  <div class="head">
      <p class="text">我的收藏</p>
      <van-icon
        @click="onClickLeft()"
        size="20"
        color="whitesmoke"
        name="arrow-left"
        class="icon"
      />
    </div>
    <!-- 内容 -->
    <!-- <div class="body"> -->
        <!-- 注意：修改if条件为“如果收藏为空” -->
        <!-- <el-link type="info" disabled v-if="1===1" class="null">收藏夹空空如也</el-link> -->
    <!-- </div> -->
      <div class="guess_like">
      <br />
      <div @click.stop="jumpDetail(item,index)" class="guess_like_show" v-for="(item, index) in list" :key="index">
        <van-image radius="10"
          class="guess_like_img"
          width="50"
          height="50"
          :src="item.collect_image_road"
        />
        <span class="guess_like_sp1">{{ item.collect_text }}</span>
        <span class="guess_like_sp2"
          >{{ item.collect_name }}</span
        >
        
      </div>
    </div>

</div>  
</template>
<script>
import http from '../api/index';
export default {
    data() {
        return {
           list: [], 
        }
    },
    methods:{
        onClickLeft() {
            this.$router.push('/mine');
        },
    },
    mounted(){
        http.myCollect({
             user_id: 1,
        }).then((r) => {
        console.log(r);
        this.list = r.data;
      });
  
    }
}
</script>
<style scoped>
.head {
  width: 100%;
  height: 4rem;
  background-color: rgb(108, 144, 243);
}
.text {
  text-align: center;
  font-size: 1.6rem;
  color: whitesmoke;
  line-height: 4rem;
}
.icon {
  position: absolute;
  top: 1.1rem;
  /* left: 0px; */
}
.body{
    width: 14rem;
    height: 10rem;
    margin:0 auto;
    margin-top: 10rem;
}
.colcla1 {
  width: 96%;
  margin: 0 auto;
  border-radius: 1.5rem;
  background-color: white;
}
.colcla1-1 {
    width: 96%;
    height: 6rem;
    position: relative;
    margin-top: 2rem;
}
.colbtn1 {
  position: absolute;
  top: 0.8rem;
  right: 0px;
  width: 7rem;
}
.colcla1-1-1{
  position: absolute;
  top: 0.1rem;
  left: 8.5rem;
  font-size: 1.8rem;
  color: #252525;
}
.colcla1-1-2{
  position: absolute;
  top: 3rem;
  left: 8.5rem;
  font-size: 1.4rem;
  color: #7a7a7a;

}
.guess_like {
  width: 96%;
  margin: 0 auto;
  border-radius: 1.5rem;
  background-color: white;
}
.guess_text {
  position: relative;
}
.guess_text_sp1 {
  position: absolute;
  left: 1.5rem;
  top: 1.5rem;
  font-size: 1.6rem;
}
.guess_arrow {
  position: absolute;
  right: 1rem;
  top: 1.3rem;
  font-size: 2rem;
}
.guess_like_show {
  width: 96%;
  height: 6rem;
  position: relative;
  margin-top: 2rem;
}
.guess_like_img {
  position: absolute;
  top: 0px;
  left: 2rem;
  border-radius: 1rem;
}
.guess_like_sp1 {
  position: absolute;
  top: 0.1rem;
  left: 8.5rem;
  font-size: 1.8rem;
  color: #252525;
}
.guess_like_sp2 {
  position: absolute;
  top: 3rem;
  left: 8.5rem;
  font-size: 1.4rem;
  color: #7a7a7a;
}
.guess_like_small {
  position: absolute;
  top: 0.8rem;
  right: 0px;
  width: 7rem;
}
</style>